﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>LoginMvc: LoginMvc Class Reference</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderCpp
            </h1>
            <h3>
                LoginMvc: LoginMvc Class Reference
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-slots">Private Slots</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">LoginMvc Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="LoginMvc" -->
<p><code>#include &lt;<a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>&gt;</code></p>

<p><a href="class_login_mvc-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a1f45b4aa714832050bbd34295c409891">LoginMvc</a> (bool use_gmail)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a245823ee215c6d32ee3fe2a56c9da233">~LoginMvc</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a87ab429303da93e11764b00db15847d5">start</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_my_view.html">MyView</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a3665a1dd1b9954ff80815ad7ad611538">getView</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_abstract_model.html">AbstractModel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a5d5c82279a85071afa6554deab4832c2">getModel</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QString &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a4bf43f44a59052b0d6f08fc06a3b51d0">getUsername</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QString &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a8a783a0322a443a4a1404cbb9c4a58e6">getPassword</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#ae76d961754cb270010d06e60b6c3d523">getLoginTimeout</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a2963191e772303b37528fa27ba52394c">login</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pri-slots"></a>
Private Slots</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a6bac2139d918bfecfabd7d80614404ba">setUsername</a> (const QString &amp;username)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#acb85bf0dda3fbd7ce20e8bc9e9171228">setPassword</a> (const QString &amp;password)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a08ce56f8c34448f63347e627fee1cbb8">setLoginTimeout</a> (int loginTimeout)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a5bcddfb319a59f74ddb86f819ac3f21e">evIntentLogin</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a7261b77a220b0e5f63b78aeffb825a57">evCancelLogin</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#ab936dfb09fbd609249cb46b91af15459">evIntentContinue</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a54f9987f4e8f29076c360c936ff8e131">evIntentLogout</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a55e8d0a25944d5f67f7b3e6266914541">evLoginComplete</a> (bool success)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#ad63b0fff1d9c266c20804e43f9277565">contextEnd</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a87d2c349c352f9f71a4afc2dc861bfc6">initSignalSlot</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a26ad074cf6f826b49efe0d57618459f3">logInit</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">LoginMvcContext *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_abstract_model.html">AbstractModel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a95a90c5c202ead622c77035868507d0f">m_pModel</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_my_view.html">MyView</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a7a1ca2ff001c8500a230f69cddf12ae6">m_loginTimeout</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#a7c3075d74734b83061c2fe7aa9a30d9f">firstTime</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#ab3b8d0e25bea9f29874af6d0571951d7">m_username</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_login_mvc.html#ae51d46d55a387571ac137c6187a36831">m_password</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00149">149</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1f45b4aa714832050bbd34295c409891"></a><!-- doxytag: member="LoginMvc::LoginMvc" ref="a1f45b4aa714832050bbd34295c409891" args="(bool use_gmail)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LoginMvc::LoginMvc </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>use_gmail</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8cpp_source.html#l00010">10</a> of file <a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                :
        <a class="code" href="class_login_mvc.html#a7a1ca2ff001c8500a230f69cddf12ae6">m_loginTimeout</a>(10000),
        <a class="code" href="class_login_mvc.html#a7c3075d74734b83061c2fe7aa9a30d9f">firstTime</a>(<span class="keyword">true</span>)
{
    <a class="code" href="class_login_mvc.html#a26ad074cf6f826b49efe0d57618459f3">logInit</a>();

    <span class="comment">//Model</span>
    <a class="code" href="class_login_mvc.html#a95a90c5c202ead622c77035868507d0f">m_pModel</a> = use_gmail ? (<a class="code" href="class_abstract_model.html">AbstractModel</a>*)<span class="keyword">new</span> <a class="code" href="class_g_mail_model.html">GMailModel</a>() : (<a class="code" href="class_abstract_model.html">AbstractModel</a>*)new <a class="code" href="class_dummy_model.html">DummyModel</a>();

    <span class="comment">//View</span>
    <a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a> = <span class="keyword">new</span> <a class="code" href="class_my_view.html">MyView</a>();
    <a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>-&gt;<a class="code" href="class_my_view.html#a35eb74bc962dbe7678e8f6407c81c039">welcomeText</a> = (use_gmail  ?<span class="stringliteral">&quot;Please enter your GMail user/password&quot;</span>:<span class="stringliteral">&quot;Username=user, Password=password&quot;</span>);

    <span class="comment">//State Machine</span>
    <a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a> = <span class="keyword">new</span> LoginMvcContext(*<span class="keyword">this</span>, *<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>, <span class="keyword">this</span>);
    <a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a>-&gt;SetObserver(SmQtObserver::GetInstance());

    <a class="code" href="class_login_mvc.html#a87d2c349c352f9f71a4afc2dc861bfc6">initSignalSlot</a>();
    setCentralWidget(<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a245823ee215c6d32ee3fe2a56c9da233"></a><!-- doxytag: member="LoginMvc::~LoginMvc" ref="a245823ee215c6d32ee3fe2a56c9da233" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LoginMvc::~LoginMvc </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8cpp_source.html#l00031">31</a> of file <a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    QLOG_INFO() &lt;&lt; <span class="stringliteral">&quot;dtor&quot;</span>;
}
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ad63b0fff1d9c266c20804e43f9277565"></a><!-- doxytag: member="LoginMvc::contextEnd" ref="ad63b0fff1d9c266c20804e43f9277565" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::contextEnd </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8cpp_source.html#l00051">51</a> of file <a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    QLOG_INFO();
    QCoreApplication::exit(0);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a7261b77a220b0e5f63b78aeffb825a57"></a><!-- doxytag: member="LoginMvc::evCancelLogin" ref="a7261b77a220b0e5f63b78aeffb825a57" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::evCancelLogin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00175">175</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{<a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a>-&gt;evCancelLogin();}
</pre></div>
</div>
</div>
<a class="anchor" id="ab936dfb09fbd609249cb46b91af15459"></a><!-- doxytag: member="LoginMvc::evIntentContinue" ref="ab936dfb09fbd609249cb46b91af15459" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::evIntentContinue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8cpp_source.html#l00077">77</a> of file <a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    QLOG_INFO();
    <a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a>-&gt;evIntentContinue();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a5bcddfb319a59f74ddb86f819ac3f21e"></a><!-- doxytag: member="LoginMvc::evIntentLogin" ref="a5bcddfb319a59f74ddb86f819ac3f21e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::evIntentLogin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00174">174</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{<a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a>-&gt;evIntentLogin();}
</pre></div>
</div>
</div>
<a class="anchor" id="a54f9987f4e8f29076c360c936ff8e131"></a><!-- doxytag: member="LoginMvc::evIntentLogout" ref="a54f9987f4e8f29076c360c936ff8e131" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::evIntentLogout </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00177">177</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{<a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a>-&gt;evIntentLogout();}
</pre></div>
</div>
</div>
<a class="anchor" id="a55e8d0a25944d5f67f7b3e6266914541"></a><!-- doxytag: member="LoginMvc::evLoginComplete" ref="a55e8d0a25944d5f67f7b3e6266914541" args="(bool success)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::evLoginComplete </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>success</em></td><td>)</td>
          <td><code> [inline, private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00180">180</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{<a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a>-&gt;evLoginComplete(success);}
</pre></div>
</div>
</div>
<a class="anchor" id="ae76d961754cb270010d06e60b6c3d523"></a><!-- doxytag: member="LoginMvc::getLoginTimeout" ref="ae76d961754cb270010d06e60b6c3d523" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int LoginMvc::getLoginTimeout </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00163">163</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{<span class="keywordflow">return</span> <a class="code" href="class_login_mvc.html#a7a1ca2ff001c8500a230f69cddf12ae6">m_loginTimeout</a>;};
</pre></div>
</div>
</div>
<a class="anchor" id="a5d5c82279a85071afa6554deab4832c2"></a><!-- doxytag: member="LoginMvc::getModel" ref="a5d5c82279a85071afa6554deab4832c2" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_abstract_model.html">AbstractModel</a>* LoginMvc::getModel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00159">159</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="class_login_mvc.html#a95a90c5c202ead622c77035868507d0f">m_pModel</a>;};
</pre></div>
</div>
</div>
<a class="anchor" id="a8a783a0322a443a4a1404cbb9c4a58e6"></a><!-- doxytag: member="LoginMvc::getPassword" ref="a8a783a0322a443a4a1404cbb9c4a58e6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const QString&amp; LoginMvc::getPassword </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00162">162</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="class_login_mvc.html#ae51d46d55a387571ac137c6187a36831">m_password</a>;};
</pre></div>
</div>
</div>
<a class="anchor" id="a4bf43f44a59052b0d6f08fc06a3b51d0"></a><!-- doxytag: member="LoginMvc::getUsername" ref="a4bf43f44a59052b0d6f08fc06a3b51d0" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const QString&amp; LoginMvc::getUsername </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00161">161</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="class_login_mvc.html#ab3b8d0e25bea9f29874af6d0571951d7">m_username</a>;};
</pre></div>
</div>
</div>
<a class="anchor" id="a3665a1dd1b9954ff80815ad7ad611538"></a><!-- doxytag: member="LoginMvc::getView" ref="a3665a1dd1b9954ff80815ad7ad611538" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_my_view.html">MyView</a>* LoginMvc::getView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00158">158</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{<span class="keywordflow">return</span> <a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>;};
</pre></div>
</div>
</div>
<a class="anchor" id="a87d2c349c352f9f71a4afc2dc861bfc6"></a><!-- doxytag: member="LoginMvc::initSignalSlot" ref="a87d2c349c352f9f71a4afc2dc861bfc6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::initSignalSlot </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8cpp_source.html#l00057">57</a> of file <a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="comment">//Signals from the view</span>
    QObject::connect(<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>-&gt;usernameEdit,SIGNAL(textChanged(QString)),<span class="keyword">this</span>, SLOT(<a class="code" href="class_login_mvc.html#a6bac2139d918bfecfabd7d80614404ba">setUsername</a>(QString)));
    QObject::connect(<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>-&gt;passwordEdit,SIGNAL(textChanged(QString)),<span class="keyword">this</span> ,SLOT(<a class="code" href="class_login_mvc.html#acb85bf0dda3fbd7ce20e8bc9e9171228">setPassword</a>(QString)));
    QObject::connect(<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>-&gt;timeoutSlider,SIGNAL(valueChanged(<span class="keywordtype">int</span>))  ,<span class="keyword">this</span> ,SLOT(<a class="code" href="class_login_mvc.html#a08ce56f8c34448f63347e627fee1cbb8">setLoginTimeout</a>(<span class="keywordtype">int</span>)));

    QObject::connect(<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>,SIGNAL(loginIntent()),<span class="keyword">this</span>,SLOT(<a class="code" href="class_login_mvc.html#a5bcddfb319a59f74ddb86f819ac3f21e">evIntentLogin</a>()));
    QObject::connect(<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>,SIGNAL(cancelIntent()),<span class="keyword">this</span>,SLOT(<a class="code" href="class_login_mvc.html#a7261b77a220b0e5f63b78aeffb825a57">evCancelLogin</a>()));
    QObject::connect(<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>,SIGNAL(contIntent()),<span class="keyword">this</span>,SLOT(<a class="code" href="class_login_mvc.html#ab936dfb09fbd609249cb46b91af15459">evIntentContinue</a>()));
    QObject::connect(<a class="code" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">m_pView</a>,SIGNAL(logoutIntent()),<span class="keyword">this</span>,SLOT(<a class="code" href="class_login_mvc.html#a54f9987f4e8f29076c360c936ff8e131">evIntentLogout</a>()));

    <span class="comment">//Signals from the model</span>
    QObject::connect(<a class="code" href="class_login_mvc.html#a95a90c5c202ead622c77035868507d0f">m_pModel</a>,SIGNAL(loginComplete(<span class="keywordtype">bool</span>)),
                     <span class="keyword">this</span>, SLOT(<a class="code" href="class_login_mvc.html#a55e8d0a25944d5f67f7b3e6266914541">evLoginComplete</a>(<span class="keywordtype">bool</span>)));

    <span class="comment">//Signals from the state machine</span>
    QObject::connect(<a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a>, SIGNAL(end()), <span class="keyword">this</span>, SLOT(<a class="code" href="class_login_mvc.html#ad63b0fff1d9c266c20804e43f9277565">contextEnd</a>()));
}
</pre></div>
</div>
</div>
<a class="anchor" id="a2963191e772303b37528fa27ba52394c"></a><!-- doxytag: member="LoginMvc::login" ref="a2963191e772303b37528fa27ba52394c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::login </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8cpp_source.html#l00083">83</a> of file <a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    QLOG_INFO() &lt;&lt; <span class="stringliteral">&quot;username &quot;</span> &lt;&lt; <a class="code" href="class_login_mvc.html#ab3b8d0e25bea9f29874af6d0571951d7">m_username</a> &lt;&lt; <span class="stringliteral">&quot;, password &quot;</span> &lt;&lt; <a class="code" href="class_login_mvc.html#ae51d46d55a387571ac137c6187a36831">m_password</a>;
    <a class="code" href="class_login_mvc.html#a95a90c5c202ead622c77035868507d0f">m_pModel</a>-&gt;<a class="code" href="class_abstract_model.html#aae115f9abc845a2ea0374caaf7be1acf">login</a>(<a class="code" href="class_login_mvc.html#ab3b8d0e25bea9f29874af6d0571951d7">m_username</a>, m_password);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a26ad074cf6f826b49efe0d57618459f3"></a><!-- doxytag: member="LoginMvc::logInit" ref="a26ad074cf6f826b49efe0d57618459f3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::logInit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8cpp_source.html#l00036">36</a> of file <a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
   QCoreApplication *pApp = QCoreApplication::instance();
   QsLogging::Logger&amp; logger = QsLogging::Logger::instance();
   logger.setLoggingLevel(QsLogging::TraceLevel);
   <span class="comment">//Log to file</span>
   <span class="keyword">const</span> QString logPath(QDir(pApp-&gt;applicationDirPath()).filePath(<span class="stringliteral">&quot;Log.txt&quot;</span>));
   QsLogging::DestinationPtr fileDestination(
      QsLogging::DestinationFactory::MakeFileDestination(logPath) );
   logger.addDestination(fileDestination);
   <span class="comment">//Log to standard output</span>
   QsLogging::DestinationPtr debugDestination = QsLogging::DestinationFactory::MakeDebugOutputDestination();
   logger.addDestination(debugDestination);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a08ce56f8c34448f63347e627fee1cbb8"></a><!-- doxytag: member="LoginMvc::setLoginTimeout" ref="a08ce56f8c34448f63347e627fee1cbb8" args="(int loginTimeout)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::setLoginTimeout </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>loginTimeout</em></td><td>)</td>
          <td><code> [inline, private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00171">171</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{ <a class="code" href="class_login_mvc.html#a7a1ca2ff001c8500a230f69cddf12ae6">m_loginTimeout</a> = loginTimeout;}
</pre></div>
</div>
</div>
<a class="anchor" id="acb85bf0dda3fbd7ce20e8bc9e9171228"></a><!-- doxytag: member="LoginMvc::setPassword" ref="acb85bf0dda3fbd7ce20e8bc9e9171228" args="(const QString &amp;password)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::setPassword </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>password</em></td><td>)</td>
          <td><code> [inline, private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00170">170</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{<a class="code" href="class_login_mvc.html#ae51d46d55a387571ac137c6187a36831">m_password</a> =  password;}
</pre></div>
</div>
</div>
<a class="anchor" id="a6bac2139d918bfecfabd7d80614404ba"></a><!-- doxytag: member="LoginMvc::setUsername" ref="a6bac2139d918bfecfabd7d80614404ba" args="(const QString &amp;username)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::setUsername </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>username</em></td><td>)</td>
          <td><code> [inline, private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00169">169</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>
<div class="fragment"><pre class="fragment">{<a class="code" href="class_login_mvc.html#ab3b8d0e25bea9f29874af6d0571951d7">m_username</a> =  username;}
</pre></div>
</div>
</div>
<a class="anchor" id="a87ab429303da93e11764b00db15847d5"></a><!-- doxytag: member="LoginMvc::start" ref="a87ab429303da93e11764b00db15847d5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoginMvc::start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8cpp_source.html#l00088">88</a> of file <a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    QLOG_INFO();
    <a class="code" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">m_pContext</a>-&gt;evStart();
}
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a7c3075d74734b83061c2fe7aa9a30d9f"></a><!-- doxytag: member="LoginMvc::firstTime" ref="a7c3075d74734b83061c2fe7aa9a30d9f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_login_mvc.html#a7c3075d74734b83061c2fe7aa9a30d9f">LoginMvc::firstTime</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00198">198</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7a1ca2ff001c8500a230f69cddf12ae6"></a><!-- doxytag: member="LoginMvc::m_loginTimeout" ref="a7a1ca2ff001c8500a230f69cddf12ae6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_login_mvc.html#a7a1ca2ff001c8500a230f69cddf12ae6">LoginMvc::m_loginTimeout</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00197">197</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae51d46d55a387571ac137c6187a36831"></a><!-- doxytag: member="LoginMvc::m_password" ref="ae51d46d55a387571ac137c6187a36831" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="class_login_mvc.html#ae51d46d55a387571ac137c6187a36831">LoginMvc::m_password</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00200">200</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>

</div>
</div>
<a class="anchor" id="a159cd30719f8509d3243527a8f3f1e24"></a><!-- doxytag: member="LoginMvc::m_pContext" ref="a159cd30719f8509d3243527a8f3f1e24" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LoginMvcContext* <a class="el" href="class_login_mvc.html#a159cd30719f8509d3243527a8f3f1e24">LoginMvc::m_pContext</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00192">192</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>

</div>
</div>
<a class="anchor" id="a95a90c5c202ead622c77035868507d0f"></a><!-- doxytag: member="LoginMvc::m_pModel" ref="a95a90c5c202ead622c77035868507d0f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_abstract_model.html">AbstractModel</a>* <a class="el" href="class_login_mvc.html#a95a90c5c202ead622c77035868507d0f">LoginMvc::m_pModel</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00194">194</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>

</div>
</div>
<a class="anchor" id="a822a8c9fc27e024f9a4f506a997c0b9a"></a><!-- doxytag: member="LoginMvc::m_pView" ref="a822a8c9fc27e024f9a4f506a997c0b9a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_my_view.html">MyView</a>* <a class="el" href="class_login_mvc.html#a822a8c9fc27e024f9a4f506a997c0b9a">LoginMvc::m_pView</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00195">195</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab3b8d0e25bea9f29874af6d0571951d7"></a><!-- doxytag: member="LoginMvc::m_username" ref="ab3b8d0e25bea9f29874af6d0571951d7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="class_login_mvc.html#ab3b8d0e25bea9f29874af6d0571951d7">LoginMvc::m_username</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_login_mvc_8h_source.html#l00199">199</a> of file <a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_login_mvc_8h_source.html">LoginMvc.h</a></li>
<li><a class="el" href="_login_mvc_8cpp_source.html">LoginMvc.cpp</a></li>
</ul>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
